﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using DeviceInfoManage.BusinessLogicLayer;
public partial class DeviceTypeDel : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["adminUserName"] == null)
        {
            Response.Redirect("login.aspx");
        }
        string deviceTypeId = Request.QueryString["deviceTypeId"];
        DeviceType deviceType = new DeviceType();
        if (deviceType.DeleteDeviceType(Int32.Parse(deviceTypeId)))
            Response.Write("<script>alert('设备类别信息删除成功!');location.href='DeviceTypeManage.aspx';</script>");
        else
            Response.Write("<script>alert('" + deviceType.ErrMessage + "');location.href='DeviceTypeManage.aspx';</script>");
    }
}
